#include <stdio.h>
#include <string.h>
int my_memcmp(void* s1, void* s2, size_t n)
{
	while (n--)
	{
		if (*(char*)s1 > *(char*)s2)
		{
			return 1;
		}
		
		else if(*(char*)s1 < *(char*)s2)
		{
			return -1;
		}
		s1 = (char*)s1 + 1;
		s2 = (char*)s2 + 1;
	}
	return 0;
}
int main()
{
	char a[] = "abcdefg";
	char b[] = "abcdef";
	int ret= my_memcmp(a, b, 20);
	printf("%d\n", ret);
	return 0;
}